package com.joelemon.mockinfluxdbdata.common;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@Slf4j
@RestControllerAdvice
public class GlobalExceptionHandler {

    /**
     * 实体校验异常捕获
     *
     * @param e
     * @return
     */
    @ExceptionHandler(SystemException.class)
    public void handler(SystemException e) {
        log.error("系统异常:{}", e.getMessage());

    }

}
